home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / qtawk / compress.exp < prev    next >
Text File  |  1990-04-23  |  307b  |  12 lines

  1. # QTAwk utility to compress multiple blank lines to one blank line
  2. #
  3. /^{_w}*$/ {  # find blank lines
  4.     if ( !i++ ) print ""; # check if first blank line - print if it is
  5.     next;   # skip to next line
  6. }
  7.  
  8.     {
  9.     i = FALSE;      # reset blank line counter
  10.     print;      # print non-blank lines
  11. }
  12.